## 10000 variables, hence 10000 t-tests will be performed
x = matrix( rnorm(200 * 1000), ncol = 1000 )
## 200 observations in total
ina = rbinom(200, 1, 0.6) + 1 ## independent samples t-test
system.time( ttests(x, ina) )
ina = rep(1:2, each = 100) ## dependent samples t-test
system.time( ttests(x, ina, paired = TRUE) )
Run the code above in your browser using DataLab